<template>
	<view class="content">
		<view class="item-bg">
			<view class="item-left">
				<image class="icon" src="../../static/ic_complete1.png"></image>
			</view>
			<view class="item-right">
				<view class="item-right-text1" style="color: #ffc105;">{{statistics.plannum}}</view>
				<view class="item-right-text2"  style="color: #ffc105;">计划数 pcs</view>
			</view>
		</view>
		
		<view class="item-bg">
			<view class="item-left">
				<image class="icon" src="../../static/ic_complete2.png"></image>
			</view>
			<view class="item-right">
				<view class="item-right-text1" style="color: #1296db;">{{statistics.goodnum}}</view>
				<view class="item-right-text2"  style="color: #1296db;">完成数 pcs</view>
			</view>
		</view>
		
		<view class="item-bg">
			<view class="item-left">
				<image class="icon" src="../../static/ic_complete3.png"></image>
			</view>
			<view class="item-right">
				<view class="item-right-text1" style="color: #07a612;">{{statistics.rate}}%</view>
				<view class="item-right-text2"  style="color: #07a612;">完成率</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {GetProductStatistics} from '../../common/product_api.js'
	
	export default {
		data() {
			return {
				statistics:{}
			};
		},
		onLoad(){
			this.loadData();
		},
		methods:{
			
			loadData(){
				GetProductStatistics().then(res=>{
					this.statistics = res[0];
				});
			},
		}
	}
</script>

<style lang="scss" scoped>
	@import url("./product-statistics.css");
</style>
